package com.ag.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * TbEventGrade entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_EVENT_GRADE", schema = "dbo", catalog = "AGDB")
public class TbEventGrade implements java.io.Serializable {

	// Fields

	private String egId;
	private TbUser tbUserByEgRequser;
	private TbUser tbUserByRgAudit;
	private TbPlan tbPlan;
	private TbEvent tbEvent;
	private String egOgrade;
	private String egNgrade;
	private String egReqResion;
	private Date egReqTime;
	private String egAudResion;
	private Date egAudTime;
	private Integer egAgree;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbEventGrade() {
	}

	/** minimal constructor */
	public TbEventGrade(String egId) {
		this.egId = egId;
	}

	/** full constructor */
	public TbEventGrade(String egId, TbUser tbUserByEgRequser,
			TbUser tbUserByRgAudit, TbPlan tbPlan, TbEvent tbEvent,
			String egOgrade, String egNgrade, String egReqResion,
			Date egReqTime, String egAudResion, Date egAudTime,
			Integer egAgree, String a, String b, String c) {
		this.egId = egId;
		this.tbUserByEgRequser = tbUserByEgRequser;
		this.tbUserByRgAudit = tbUserByRgAudit;
		this.tbPlan = tbPlan;
		this.tbEvent = tbEvent;
		this.egOgrade = egOgrade;
		this.egNgrade = egNgrade;
		this.egReqResion = egReqResion;
		this.egReqTime = egReqTime;
		this.egAudResion = egAudResion;
		this.egAudTime = egAudTime;
		this.egAgree = egAgree;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "EG_ID", unique = true, nullable = false, length = 32)
	public String getEgId() {
		return this.egId;
	}

	public void setEgId(String egId) {
		this.egId = egId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EG_REQUSER")
	public TbUser getTbUserByEgRequser() {
		return this.tbUserByEgRequser;
	}

	public void setTbUserByEgRequser(TbUser tbUserByEgRequser) {
		this.tbUserByEgRequser = tbUserByEgRequser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RG_AUDIT")
	public TbUser getTbUserByRgAudit() {
		return this.tbUserByRgAudit;
	}

	public void setTbUserByRgAudit(TbUser tbUserByRgAudit) {
		this.tbUserByRgAudit = tbUserByRgAudit;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "P_ID")
	public TbPlan getTbPlan() {
		return this.tbPlan;
	}

	public void setTbPlan(TbPlan tbPlan) {
		this.tbPlan = tbPlan;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "E_ID")
	public TbEvent getTbEvent() {
		return this.tbEvent;
	}

	public void setTbEvent(TbEvent tbEvent) {
		this.tbEvent = tbEvent;
	}

	@Column(name = "EG_OGRADE", length = 4)
	public String getEgOgrade() {
		return this.egOgrade;
	}

	public void setEgOgrade(String egOgrade) {
		this.egOgrade = egOgrade;
	}

	@Column(name = "EG_NGRADE", length = 4)
	public String getEgNgrade() {
		return this.egNgrade;
	}

	public void setEgNgrade(String egNgrade) {
		this.egNgrade = egNgrade;
	}

	@Column(name = "EG_REQ_RESION", length = 1024)
	public String getEgReqResion() {
		return this.egReqResion;
	}

	public void setEgReqResion(String egReqResion) {
		this.egReqResion = egReqResion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EG_REQ_TIME", length = 23)
	public Date getEgReqTime() {
		return this.egReqTime;
	}

	public void setEgReqTime(Date egReqTime) {
		this.egReqTime = egReqTime;
	}

	@Column(name = "EG_AUD_RESION", length = 1024)
	public String getEgAudResion() {
		return this.egAudResion;
	}

	public void setEgAudResion(String egAudResion) {
		this.egAudResion = egAudResion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EG_AUD_TIME", length = 23)
	public Date getEgAudTime() {
		return this.egAudTime;
	}

	public void setEgAudTime(Date egAudTime) {
		this.egAudTime = egAudTime;
	}

	@Column(name = "EG_AGREE")
	public Integer getEgAgree() {
		return this.egAgree;
	}

	public void setEgAgree(Integer egAgree) {
		this.egAgree = egAgree;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}